<?php
// Pull in the NuSOAP code
require_once("vnpay/libs/nusoap.php");

$client = new nusoap_client('http://112.78.7.141:1500/MVASCONTENT/MTSend.asmx?WSDL', true);
 $err = $client->getError();
      
      if ($err) {
         
         echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
         
         exit;
         
      }else {
         
         echo "<h2>Successfully connected</h2>";
         
      }
	  
$client->soap_defencoding = 'UTF-8';

	
$flag="1";
$Total="1";
$type="0";
$secu="123456";
$sendfrom ="8017";
$keyword="TD";
//================
$SeqNo="35707";
$dienThoai="84942875640";
$outcontent="AZ local 35707";

$param = array (
			"Destination" => $dienThoai, 
			"SendFrom" => $sendfrom,
			"KeywordName" => $keyword,
			"OutContent" => $outcontent,
			"ChargingFlag" => $flag,
			"MOSeqNo" => $SeqNo,
			"TotalMessage" => $Total,
			"ContentType" => $type,
			"SecretCode" => $secu,
		);
$result = $client->call('SendMT', $param);
		

echo '<p>'.print_r($result, true).'</p>';
echo $result['SendMTResult'] . $SeqNo;


echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>